<include file="__THEME__/header" />

<link rel="stylesheet" href="../Public/bug.css" type="text/css" media="screen" charset="utf-8" />

<div class="content">
    <!-- 内容 begin  --><include file="__THEME__/apps" />
    <div class="main">
        <!-- 画布 begin  -->
    <div class=page_title> <!-- page_title begin -->
                        <h2><img src="{$APPINFO['APP_ICON']}" />{$APPINFO['APP_CNNAME']}</h2>
    <div class="c"></div>
</div><!-- page_title end -->
    <div class="tab-menu"><!-- 切换标签 begin  -->
      <ul>
        <li><a href="__APP__/Index" ><span>全部Bug</span></a></li>
        <li><a href="__APP__/Index/my" ><span>我发布的Bug</span></a></li>
        <li><a href="#" class="on"><span><div class="ico_add">&nbsp;</div>修改Bug</span></a></li>
      </ul>
    </div><!-- 切换标签 end  -->
        <div class="BlogBox" style="margin-top:20px;">
			<form action="__APP__/Bug/doedit" method="POST" onsubmit="return checkform();return false;">
			<input type="hidden" name="id" value="{$buginfo.id}">
                <div class="LogList">
                    <!-- 发表日志 begin  -->
                    <ul class="edit">
                        <li>
                            <div class="c1">
                                标题：
                            </div>
                            <div class="c2">
                                <input id="title" name="title" type="text" class="TextH20" style="width:60%; onBlur="this.className='TextH20'" onFocus="this.className='Text2'" value="{$buginfo.title}" maxlength="30" />
                            </div>
                        </li>                    
                        <li>
                            <div class="c1">
                                版本：
                            </div>
                            <div class="c2">
                                <select name="edition">
                                	<volist id="vo" name="edition">
                                		<php>$selected = ($vo['id']==$buginfo['edition'])?'selected':''</php>
                                		<option value="{$vo.id}" {$selected}>{$vo.title}</option>
                                	</volist>
                                </select>
                            </div>
                        </li>
                        
                        <li>
                            <div class="c1">
                                类型：
                            </div>
                            <div class="c2">
                                <select name="catid" class="TextH20">
                                	<volist id="cat" name="category">
                                		<php>$selected = ($cat['id']==$buginfo['catid'])?'selected':''</php>
                                		<option value="{$cat.id}" {$selected}>{$cat.title}</option>
                                	</volist>
                                </select>
                            </div>
                        </li>                        
                        <li style="padding:0;">
                            <div class="c1" style="line-height:30px;">
                                浏览器：
                            </div>
                            <div class="c2">
                                <input type="text" name="browser" id="browser" value="{$buginfo.browser}">
                            </div>
                        </li>   
                        
                        <li style="padding:0;">
                            <div class="c1" style="line-height:30px;">
                                安装环境：
                            </div>
                            <div class="c2">
                                <input type="text" name="setting" id="setting" value="{$buginfo.setting}">
                            </div>
                        </li>    
                        <li>
                            <div class="c1">
                                内容：
                            </div>
                            <div class="c2">
                                {:W("Edit",array('smileList'=>$smileList,'smilePath'=>$smilePath,'content'=>$buginfo[content]))}
                            </div>
                        </li>

                        <li>
                            <div class="c1">
                                &nbsp;
                            </div>
                            <div class="c2">
                                <input type="submit" class="btn_b" value="修 改" />
                            </div>
                        </li>
                    </ul>
                </div>
            </form><!-- 好友日志 end  -->

        </div>
    </div><!-- 画布 end  -->
    <div class="c"></div>
<script>
function checkform(){
	if($('#title').val().length < 6){
		Error('标题不能小于6位字符！');
		$('#title').focus();
		return false;
	}
	
	if($.trim($('#browser').val())==''){
		Error('浏览器类型不能为空！');
		$('#browser').focus();
		return false;
	}	
	
	if($.trim($('#setting').val())==''){
		Error('程序运行环境不能为空！');
		$('#setting').focus();
		return false;
	}		

	var html = KE.util.getData('content');
	if(html.length < 6){
		Error('请将问题描述完整');
		$('#content').focus();
		return false;
	}
}
</script>    
</div><!-- 内容 end --><include file="__THEME__/footer" />
